<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
  <title>Glodomor</title>
  <%= stylesheet_link_tag 'styles'  %>
  <%= javascript_include_tag :defaults  %>
</head>
<body>
<div id="wrap">
  <div id="header"><h1>Glodomor</h1></div>
  <div id="nav">
    <ul style="float: left; display:inline;">
      <li><%= link_to 'My orders', :controller => :line_items, :action => :index %>
      <li><%= link_to 'Store', :controller => :store %></li>	
      <li>|</li>
      <li><%= link_to 'Meals', meals_path %></li>
      <li><%= link_to 'Products', products_path %></li>
      <li><%= link_to 'Product categories', product_categories_path %></li>
      <li><%= link_to 'Restaurants', restaurants_path %></li>
      <li>|</li>
      <li><%= link_to 'Users', users_path %></li>
      <li><%= link_to 'User groups', user_groups_path %></li>
    </ul>
    <ul style="text-align: right;">
      <% unless logged_in? %>
        <li><a href="#"><%= link_to 'Login', login_path %></a></li>
      <% else %>
        <li><%= link_to 'My profile', current_user %></li>
        <li><a href="#"><%= link_to "Logout", logout_path %></a></li>
      <% end %>
    </ul>
  </div>
  <div id="main">
    <%= flash[:notice] %>
    <%= yield %>
  </div>
  <div id="sidebar">
    <% if logged_in? %>
      <h2>Hello <%= "#{current_user.first_name}" %></h2>
    <% end %>
    
    <h2>Your cart</h2>
    <div id="cart">
      <%= render :partial => 'store/cart', :object => @cart %>
    </div>
  </div>
  <div id="footer">
    <p>Footer</p>
  </div>
</div>